<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of inicio
 *
 * @author JamesNote
 */
class Inicio extends CI_Controller {

    private $main_controler;

    private $idioma;

    private $arquivosJs = array(
        'https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js',
        'https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js',
        'index.js'
    );

    private $arquivosCss = array(
        'index.css',
        'estrutura.css',
        'ui/jquery.ui.all.css',
        'resets.css');


    function __construct() {
        parent::__construct();
        //$this->load->model('template');
        $this->main_controler['title'] = 'Pagina sem titulo';
        $this->main_controler['data'] = array();
        $this->main_controler['controller'] = array('inicio',array());

        $this->template->setCss($this->arquivosCss);
        $this->template->setJs($this->arquivosJs);


        $linguagem = $this->input->get('linguagem');

        if($linguagem == "pt_br"){

            $this->lang->load('portugues_br', 'portugues_br');

        }else if($linguagem == "en_us"){

            $this->lang->load('english', 'english');

        }else{

            $this->lang->load('portugues_br', 'portugues_br');

        }
        $this->idioma =  $this->lang->language;

    }

    function index(){

        // Menu principal
        $this->main_controler['menu'] = $this->template->getViewsPath().'/menu/menu_inicio';
        $this->template->loadTemplate($this->main_controler,$this->idioma);
    }

    function teste(){


        $this->main_controler['controller'] = array('teste',array());
        $this->main_controler['data']['maikom'] = 'teste maikom';

        $this->template->loadTemplate($this->main_controler,$this->idioma);


    }
    function perfil(){
        $this->load->model('usuario');
        $q = $this->usuario->getPessoasQueSegue(26);
        print_r ($q);
    }

}